/**
 * 
 */
package de.mbenning.fsim.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author Martin.Benning
 *
 */
@Entity
@Table (name = "ADRESSE")
public class Adresse implements Serializable {

	private static final long serialVersionUID = 2172839766303688462L;

	@Id
	@GeneratedValue (strategy = GenerationType.TABLE)
	@Column (name = "ADRESSE_ID",updatable = false, nullable = false)
	private Integer id;
	
	@Column (name = "STRASSE", length = 50)
	private String strasse;
	
	@Column (name = "HAUSNUMMER", length = 8)
	private String hausnummer;
	
	@Column (name = "PLZ", length = 15)
	private String plz;
	
	@Column (name = "ORT", length = 50)
	private String ort;
	
	@ManyToOne (fetch = FetchType.LAZY)
	@JoinColumn (name = "LAND_ID")
	private Land land;
		
	public Adresse() {
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getStrasse() {
		return strasse;
	}

	public void setStrasse(String strasse) {
		this.strasse = strasse;
	}
	
	public String getHausnummer() {
		return hausnummer;
	}

	public void setHausnummer(String hausnummer) {
		this.hausnummer = hausnummer;
	}	

	public String getPlz() {
		return plz;
	}

	public void setPlz(String plz) {
		this.plz = plz;
	}

	public String getOrt() {
		return ort;
	}

	public void setOrt(String ort) {
		this.ort = ort;
	}

	public Land getLand() {
		return land;
	}

	public void setLand(Land land) {
		this.land = land;
	}
	
}
